package com.dt.dubai.mber.entity;

import com.dt.dubai.core.comm.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.*;

import javax.persistence.Table;
import javax.validation.constraints.*;

import java.util.Date;

/*
 * 顾客登录表
 */

@Data
@Table(name = "dt_mber_customer_login")
@EqualsAndHashCode(callSuper = false)
public class MberCustomerLoginEntity extends BaseEntity {

    //手机号码
    @NotNull(message = "mobilePhone参数不能为空")
    @Length(min = 0, max = 11, message = "mobilePhone参数最大长度不11")
    String mobilePhone;

    //微信用户标识ID
    @Length(min = 0, max = 64, message = "weixinUnionid参数最大长度不64")
    String weixinUnionid;

    //微信公众号ID
    @Length(min = 0, max = 64, message = "weixinOpenid参数最大长度不64")
    String weixinOpenid;

    //微信小程序ID
    @Length(min = 0, max = 64, message = "weiappOpenid参数最大长度不64")
    String weiappOpenid;

    //昵称
    @Length(min = 0, max = 36, message = "nickNameZh参数最大长度不36")
    String nickNameZh;

    //密码
    @Length(min = 0, max = 128, message = "pwd参数最大长度不128")
    String pwd;

    //盐
    @Length(min = 0, max = 6, message = "salt参数最大长度不6")
    String salt;

    //性别 1-女性,2-男性,3-未知
    Short sex;

    //头像地址 选64
    @Length(min = 0, max = 160, message = "customerIconRul参数最大长度不160")
    String customerIconRul;

    //状态 0-正常,1-锁定,2-禁用
    Short loginStatus;

    //实名状态 0-未认证,1-已认证
    Boolean realNameStatus;

    //登录IP
    @Length(min = 0, max = 20, message = "loginIpAddr参数最大长度不20")
    String loginIpAddr;

    //登录时间
    Date loginTime;


}
